﻿@using X.PagedList;
@using OA.Model;
@using OA.Core.Helper;
@model PageList<Diary>
@{
    ViewBag.Title = "工作日志列表";
    Layout = "~/Areas/Member/Views/Shared/_Layout.cshtml";
    string empName = ViewBag.EmpName;
    string startTime = ViewBag.StartTime;
    string endTime = ViewBag.EndTime;
}
<div class="layui-tab layui-tab-brief" lay-filter="user">
    <div class="layui-form layui-tab-content" id="LAY_ucm">
        <form action="" class="layui-form">
            <div class="layui-form-item" style="margin: 10px 0 0;">
                <div class="layui-inline">
                    <label class="layui-form-label" style="width: auto; padding-right: 5px;">姓名/工号：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="empName" class="layui-input" value="">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">开始时间：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="startTime" class="layui-input mydate" id="startTime" data-type="date" placeholder="开始时间" value="" autocomplete="off" data-format="yyyy-MM-dd">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">结束时间：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="endTime" class="layui-input mydate" id="endTime" data-type="date" placeholder="结束时间" value="" autocomplete="off" data-format="yyyy-MM-dd">
                    </div>
                </div>
                <div class="layui-inline">
                    <button type="button" class="layui-btn searchButton">搜索</button>
                    <button type="button" id="search_btn" class="layui-btn">导出</button>
                </div>
            </div>
        </form>
    </div>
    <table class="layui-table" lay-data="{url:'GetData', cellMinWidth: 80, page: true,limit:15}" id="resultList" lay-filter="resultList">
        <thead>
            <tr>

                <th lay-data="{field:'DateTime', width:120}">日期</th>
                <th lay-data="{field:'EmpID', width:80}">工号</th>
                <th lay-data="{field:'EmpName', width:90}">姓名</th>
                <th lay-data="{field:'Details', }">内容</th>
            </tr>
        </thead>
    </table>
    
</div> 
<script type="text/javascript">
    $("#search_btn").click(function () {
        var empName = $("#empName").val();
        var startTime = $("#startTime").val();
        var endTime = $("#endTime").val();
        var url = "/Member/DepartmentDiary/Export?empName=" + empName + "&startTime=" + startTime + "&endTime=" + endTime;
        ShowPage(url,"部门日志导出")
    });
</script>